﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace CrclzChat.Areas.Identity.Data
{
	public class APost
	{
		[Key]
		[Required]
		[DatabaseGenerated(DatabaseGeneratedOption.None)]
		public Guid PostId { get; set; }

		[Required]
		public Guid UserId { get; set; }

		[Required]
		[MinLength(3)]
		[MaxLength(14)]
		public string Title { get; set; }

		[Required]
		[MinLength(14)]
		[MaxLength(560)]
		public string Text { get; set; }

		[Required]
		public Guid TopicId { get; set; }

		[Required]
		public DateTime Time { get; set; }

		// Navigation Properties
		public Topic Topic { get; set; }

		public OneUser User { get; set; }

		public IEnumerable<Floor> Floors { get; set; }
	}
}
